package com.corange.insuranceinformation.common.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @Title: ResultData
 * @Prject: insurance-information
 * @Package: com.corange.insuranceinformation.common.utils
 * @Description:
 * @author: willinggod
 * @date: 2019/11/1 17:42
 * @version: V1.0
 */
public class ResultData extends HashMap {
    private Map map;
    public ResultData(){
        map=new HashMap<>(16);
    }

    public static ResultData ok(){
        ResultData map=new ResultData();
        map.put("code",0);
        map.put("msg","success");
        return map;
    }

    public static ResultData error(){
        ResultData map=new ResultData();
        map.put("code",1);
        map.put("msg","failure");
        return map;
    }
    public static ResultData error(String msg){
        ResultData map=new ResultData();
        map.put("code",1);
        map.put("msg",msg);
        return map;
    }

}
